<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <jsp:useBean id="show" class="com.bookshopsystem.service.DataShow"></jsp:useBean>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../style/css/bookInfo.css" />
<script type="text/javascript" src="../style/js/book.js"></script>
<script type="text/javascript" src="../style/js/jquery"></script>
<script type="text/javascript">
	$(function() {
		var heigth=document.getElementsByClassName("rightDiv")[0].offsetHeight;
		document.getElementsByClassName("leftDiv")[0].style.height=heigth+"px";
	});
</script>
<title>BOOKINFO</title>
</head>
<body>
	<%@include file="head.jsp" %>
	<div id="content">
	<jsp:setProperty property="bookId" name="show" value="${param.book }"/>
	<c:forEach items="${show.getBookInfo()}" var="b">
		<div class="left">
			<img src="../style/img/book_logo/${b.picPath}">
		</div>
		<div class="right">
			<h1>${b.title }</h1>
			<ul>
				<li class="author">${b.author }</li>
				<li class="price">价格：<span>￥${b.unprice }</span></li>
				<li class="shoppingPoint">
					<div class="bookNumPoint">
						<input type="text" id="bookNum" value="1" onkeyup="this.value=this.value.replace(/\D/g,'')" onblur="this.value=this.value>0?this.value:1" />
						<input type="button" class="btnReduce" value="-" onclick="bookNumChange('this','reduce')"/>
						<input type="button" class="btnAdd" value="+" onclick="bookNumChange('this','add')" />
					</div>
					<a class="goShopping" href="javascript:void(0)" onclick="addShopping(${b.id },'false')">加入购物车</a>
				</li>
			</ul>
		</div>
		<div class="leftDiv">
		</div>
		<div class="rightDiv">
		<div class="bookReCommend">
			<h2>图书信息</h2> 
			<table>
				<tr>
					<td>出版社：${b.publish.name }</td>
					<td>ISBN：${b.ISBN }</td>
					<td>出版时间:${b.publishDate }</td>
				</tr>
				<tr>
					<td>字数：${b.worldsCount }</td>
					<td>种类：${b.category.name }</td>
				</tr>
			</table>
		</div>
		<div class="bookDescription">
			<h2>书评</h2>
			<p>${b.editorComment }</p>
		</div>
		<div class="contentDescription">
			<h2>内容简介</h2>
			<p>${b.contentDescription }</p>
		</div>
		<div class="authorDescription">
			<h2>作者简介</h2>
			<p>${b.authorDescription }</p>
		</div>
		<div class="toc">
			<h2>目录</h2>
			<p>${b.toc }</p>
		</div>
		</div>
	</c:forEach>
	</div>
	<%@include file="footer.jsp" %>
</body>
</html>